package com.xiaoshuidi.cloud.module.member.convert.address;


import com.xiaoshuidi.cloud.framework.common.pojo.PageResult;
import com.xiaoshuidi.cloud.module.member.api.address.dto.AddressRespDTO;
import com.xiaoshuidi.cloud.module.member.controller.app.address.vo.AppAddressCreateReqVO;
import com.xiaoshuidi.cloud.module.member.controller.app.address.vo.AppAddressRespVO;
import com.xiaoshuidi.cloud.module.member.controller.app.address.vo.AppAddressUpdateReqVO;
import com.xiaoshuidi.cloud.module.member.pojo.user.MemberAddress;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 用户收件地址 Convert
 *
 * @author 芋道源码
 */
@Mapper
public interface AddressConvert {

    AddressConvert INSTANCE = Mappers.getMapper(AddressConvert.class);

    MemberAddress convert(AppAddressCreateReqVO bean);

    MemberAddress convert(AppAddressUpdateReqVO bean);

    AppAddressRespVO convert(MemberAddress bean);

    List<AppAddressRespVO> convertList(List<MemberAddress> list);

    PageResult<AppAddressRespVO> convertPage(PageResult<MemberAddress> page);

    AddressRespDTO convert02(MemberAddress bean);

}
